namespace Digitalmes.Application.Mes;

/// <summary>
/// 工位信息表
/// </summary>
public sealed class MdStationDto : Dto
{
    /// <summary>
    /// 工位编号
    /// </summary>
    [Required, NotNull]
    [StringLength(32)]
    public string? OpCode { get; set; }

    /// <summary>
    /// 工位名称
    /// </summary>
    [Required, NotNull]
    [StringLength(32)]
    public string? OpName { get; set; }

    /// <summary>
    /// 所属产线Id
    /// </summary>
    public long LineId { get; set; }

    /// <summary>
    /// 产线编号
    /// </summary>
    public string? LineCode { get; set; }

    /// <summary>
    /// 产线名称
    /// </summary>
    public string? LineName { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Sort { get; set; }

    /// <summary>
    /// 工位属性（人工/设备）
    /// </summary>
    public OpAttrEnum Attr { get; set; }

    public string? AttrDesc => Attr.Description();

    /// <summary>
    /// 工位归属（线上/线外）
    /// </summary>
    public OpOwnerEnum Owner { get; set; }

    public string? OwnerDesc => Owner.Description();

    /// <summary>
    /// 工位分类（装配/检测/返工）
    /// </summary>
    public OpClassifyEnum Classify { get; set; }

    public string? ClassifyDesc => Classify.Description();

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string? CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string? UpdateUser { get; set; }
}
